home *** CD-ROM | disk | FTP | other *** search
/ Info-Mac 4 / Info_Mac IV CD-ROM (Pacific HiTech Inc.)(August 1994).iso / Development / Source / GENetReleaseƒ / GEBreakout / BGame.h < prev    next >
Text File  |  1994-03-07  |  1KB  |  80 lines

  1. /*
  2.     BGame.h
  3.     
  4.     Game running code for Breakout Demo
  5.     
  6.     Copyright 1994 by Al Evans. All rights reserved.
  7.     
  8.     2/24/94
  9.     
  10. */
  11.  
  12. /*
  13.     A very simple game written with Graphic Elements.
  14. */
  15.  
  16.  
  17. //To load precompiled symbol table under MPW C
  18. #ifdef applec
  19. #ifndef __cplusplus
  20. #ifndef PRELOAD
  21. #pragma load "::ToolKit.precompile"
  22. #define PRELOAD
  23. #endif
  24. #endif
  25. #endif
  26.  
  27. #include "GraphElements.h"
  28.  
  29. //Resource numbers of game element PICTs
  30.  
  31. #define rPaddle        200
  32. #define rBall        300
  33. #define rBkg        400
  34. #define rBrick        500
  35.  
  36. //IDs of game elements
  37.  
  38. #define paddleID        'PADL'
  39. #define ballID            'BALL'
  40. #define bkgID            'BKGD'
  41. #define firstBrickID    'BRK\0'
  42. #define scoreID            'SCOR'
  43.  
  44. //Planes of game elements
  45.  
  46. #define paddlePlane        200
  47. #define ballPlane        300
  48. #define brickPlane        200
  49. #define bkgPlane        1
  50. #define scorePlane        900
  51.  
  52. //Game window size
  53. #define gWindWidth        342
  54. #define gWindHeight        370
  55.  
  56. #ifdef __cplusplus
  57. extern "C" {
  58. #endif
  59.  
  60. //Setup
  61. Boolean LoadBreakoutGame(GEWorldPtr world);
  62.  
  63. //Start a game
  64. void NewBreakoutGame(GEWorldPtr world);
  65.  
  66. //Autochange procs
  67.  
  68. pascal void DoPaddle(GEWorldPtr world, GrafElPtr paddle);
  69. pascal void DoBall(GEWorldPtr world, GrafElPtr ball);
  70. pascal void DoScore(GEWorldPtr world, GrafElPtr scoreBoard);
  71.  
  72. //Ball's collision proc
  73. pascal void DoBallHit(GEWorldPtr world, GrafElPtr ball, GEDirection dir, GrafElPtr objHit);
  74.  
  75.  
  76.  
  77. #ifdef __cplusplus
  78. }
  79. #endif
  80.